const express = require('express');
let app = express();
var expressWs = require('express-ws');
expressWs(app);

// 首页
const helloWord = require('../helloWord');
// 注册
const register = require('./user/register');
// 登录
const login = require('./user/login');
// 获取用户信息
const getuserinfo = require('./user/getuserinfo');
// 创建角色
const create = require('./user/create');
// 修改密码
const changpwd = require('./user/changpwd');
// 登出
const loginOut = require('./user/loginOut');

app.use('/', helloWord);
app.use('/api/user', register);
app.use('/api/user', login);
app.use('/api/user', create);
app.use('/api/user', getuserinfo);
app.use('/api/user', changpwd);
app.use('/api/user', loginOut);

module.exports = app